package com.runrunfast.fxj.exception;

import com.runrunfast.fxj.enums.ResultEnum;

import lombok.Getter;

/**
 * @author: 陈胤训
 * @create: 2018-08-08 16:27
 **/
@Getter
public class FxjException extends RuntimeException {

    private Integer code;

    public FxjException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public FxjException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
